HDDS-13311. Directory Deleting Service can use deleteRange for subDirectories and subFiles#9423
Draft
aryangupta1998 wants to merge 14 commits intoapache:masterfrom
Draft
HDDS-13311. Directory Deleting Service can use deleteRange for subDirectories and subFiles#9423aryangupta1998 wants to merge 14 commits intoapache:masterfrom
aryangupta1998 wants to merge 14 commits intoapache:masterfrom
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
DirectoryDeletingService should use rocksdb deleteRange instead of creating individual tombstones which can cause seek time issue. But in the presence of snapshots the deleteRange APi should stitch continuous key ranges together that are reclaimable and not issue a blind deleteRange which could lead to incorrect reclaimation of the entry and lead to unreference orphan blocks when the snapshots are deleted.
DeleteRange APIs on FileTable, DirectoryTable, KeyTable can be used by background garbage collection services and should never be used by user facing APIs like keyDelete as that can cause issues in snapshot correctness.
E.g.
Then DirectoryDeletingService should issue 2 delete range like
[Dir1/Key1..Dir1/Key2] (Both inclusive)
[Dir1/Key4..Dir1/Key5]
In terms of rocksdb deleteRange where the end key range is exclusive this would be equivalent to
[Dir1/Key1..Dir1/Key3) and [Dir1/Key4..lexicographicalHigherString(Dir1/)]
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-13311
How was this patch tested?
Testes via UT.